Skip to main content
Version: Staging

SpdrParentAllocation

V8 Message Definiton

METADATA

AttributeValue
Topic3695-order-allocation
MLink TokenSystemData
ProductSRTrade
accessTypeSELECT,INSERT

Table Definition

FieldTypeKeyDefault ValueComment
baseParentNumberCHAR(19)PRI'0000-0000-0000-0000'
omniAccntVARCHAR(16)''omnibus accnt SR accnt
clientFirmVARCHAR(16)''SR client firm
secKey_atenum - AssetType'None'security key stock future or option
secKey_tsenum - TickerSrc'None'security key stock future or option
secKey_tkVARCHAR(12)''security key stock future or option
secKey_yrSMALLINT UNSIGNED0security key stock future or option
secKey_mnTINYINT UNSIGNED0security key stock future or option
secKey_dyTINYINT UNSIGNED0security key stock future or option
secKey_xxDOUBLE0security key stock future or option
secKey_cpenum - CallPut'Call'security key stock future or option
secTypeenum - SpdrKeyType'None'security type
mlegLegKeyTINYTEXT''secKeyStringKeylegRatiosidepositionEffect secKeyStringKeylegRatiosidepositionEffect
orderSideenum - BuySell'None'order side always buy for MLEG orders
ssaleFlagenum - ShortSaleFlag'None'ssale flag None if not stock
positionTypeenum - PositionType'None'positionType None if not equity option
spdrSourceenum - SpdrSource'None'parent order source
groupingCodeCHAR(19)'0000-0000-0000-0000'unique broker code
allocationRuleenum - AllocationRule'None'
readyToSendenum - YesNo'None'indicates that this noticed is ready to forward to a custodian
modifiedByVARCHAR(24)''user who last modified this record
modifiedInenum - SysEnvironment'None'
timestampDATETIME(6)'1900-01-01 00:00:00.000000'timestamp of last modification
FragmentsListJSON'JSON_OBJECT()'

PRIMARY KEY DEFINITION (Unique)

FieldSequence
baseParentNumber1

JSON Block (FragmentsList)

FieldTypeComment
allocAccntstringtarget SR alloc accnt
clientFirmstringSR client firm
allocFractionfloattarget alloc size if parent order 100 fills
allocSizeinttarget alloc size assuming parent order 100 fills

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRTrade`.`MsgSRParentAllocation` (
`baseParentNumber` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000',
`omniAccnt` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'omnibus accnt (SR accnt)',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR client firm',
`secKey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'security key (stock, future, or option)',
`secKey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'security key (stock, future, or option)',
`secKey_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'security key (stock, future, or option)',
`secKey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'security key (stock, future, or option)',
`secKey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'security key (stock, future, or option)',
`secKey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'security key (stock, future, or option)',
`secKey_xx` DOUBLE NOT NULL DEFAULT 0 COMMENT 'security key (stock, future, or option)',
`secKey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call' COMMENT 'security key (stock, future, or option)',
`secType` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None' COMMENT 'security type',
`mlegLegKey` TINYTEXT NOT NULL DEFAULT '' COMMENT '[secKey.StringKey;legRatio;side;positionEffect, secKey.StringKey;legRatio;side;positionEffect, ...]',
`orderSide` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None' COMMENT 'order side (always buy for MLEG orders)',
`ssaleFlag` ENUM('None','Long','Short','Exempt','Auto','Open','Close','Cover','NA') NOT NULL DEFAULT 'None' COMMENT 'ssale flag (None if not stock)',
`positionType` ENUM('None','Opening','Closing','Auto') NOT NULL DEFAULT 'None' COMMENT 'positionType (None if not equity option)',
`spdrSource` ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') NOT NULL DEFAULT 'None' COMMENT 'parent order source',
`groupingCode` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000' COMMENT 'unique broker code',
`allocationRule` ENUM('None','Random') NOT NULL DEFAULT 'None',
`readyToSend` ENUM('None','Yes','No') NOT NULL DEFAULT 'None' COMMENT 'indicates that this noticed is ready to forward to a custodian',
`modifiedBy` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'user who last modified this record',
`modifiedIn` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'timestamp of last modification',
`FragmentsList` JSON NOT NULL DEFAULT JSON_OBJECT() CHECK(JSON_VALID(FragmentsList)),
CONSTRAINT nonnegative_baseParentNumber CHECK(ASCII(baseParentNumber) < 56),
CONSTRAINT nonnegative_groupingCode CHECK(ASCII(groupingCode) < 56),
PRIMARY KEY USING HASH (`baseParentNumber`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';

SELECT TABLE EXAMPLE QUERY

SELECT
`baseParentNumber`,
`omniAccnt`,
`clientFirm`,
`secKey_at`,
`secKey_ts`,
`secKey_tk`,
`secKey_yr`,
`secKey_mn`,
`secKey_dy`,
`secKey_xx`,
`secKey_cp`,
`secType`,
`mlegLegKey`,
`orderSide`,
`ssaleFlag`,
`positionType`,
`spdrSource`,
`groupingCode`,
`allocationRule`,
`readyToSend`,
`timestamp`,
`FragmentsList`
FROM `SRTrade`.`MsgSRParentAllocation`
WHERE
/* Replace with a CHAR(19) */
`baseParentNumber` = 'Example_baseParentNumber';

INSERT TABLE EXAMPLE QUERY

INSERT INTO `SRTrade`.`MsgSRParentAllocation`(
/* Replace with a CHAR(19) */
`baseParentNumber`,
/* Replace with a VARCHAR(16) */
`omniAccnt`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`secKey_at`,
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`secKey_ts`,
/* Replace with a VARCHAR(12) */
`secKey_tk`,
/* Replace with a SMALLINT UNSIGNED */
`secKey_yr`,
/* Replace with a TINYINT UNSIGNED */
`secKey_mn`,
/* Replace with a TINYINT UNSIGNED */
`secKey_dy`,
/* Replace with a DOUBLE */
`secKey_xx`,
/* Replace with a ENUM('Call','Put','Pair') */
`secKey_cp`,
/* Replace with a ENUM('None','Stock','Future','Option','MLeg') */
`secType`,
/* Replace with a TINYTEXT */
`mlegLegKey`,
/* Replace with a ENUM('None','Buy','Sell') */
`orderSide`,
/* Replace with a ENUM('None','Long','Short','Exempt','Auto','Open','Close','Cover','NA') */
`ssaleFlag`,
/* Replace with a ENUM('None','Opening','Closing','Auto') */
`positionType`,
/* Replace with a ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') */
`spdrSource`,
/* Replace with a CHAR(19) */
`groupingCode`,
/* Replace with a ENUM('None','Random') */
`allocationRule`,
/* Replace with a ENUM('None','Yes','No') */
`readyToSend`,
/* Replace with a DATETIME(6) */
`timestamp`,
/* Replace with a JSON */
`FragmentsList`
)
VALUES(
'Example_baseParentNumber',
'Example_omniAccnt',
'Example_clientFirm',
'None',
'None',
'Example_secKey_tk',
123,
1,
1,
4.56,
'Call',
'None',
'dummy tiny text',
'None',
'None',
'None',
'None',
'Example_groupingCode',
'None',
'None',
'2022-01-01 12:34:56.000000',
'{"key": "value"}'
);

Doc Columns Query

SELECT * FROM SRTrade.doccolumns WHERE TABLE_NAME='SpdrParentAllocation' ORDER BY ordinal_position ASC;